package cn.pet.service.manage.controller;

import cn.pet.service.manage.entity.api.Result;
import cn.pet.service.manage.service.StatService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/home")
public class HomeController {

    @Resource
    private StatService statService;

    /**
     * 获取普通统计数量
     * @return
     */
    @GetMapping("commonStat")
    private Object commonStat(){
        return Result.ok("success",statService.getCommonStat());
    }

    @GetMapping("listSubApprovingLists")
    private Object listSubApprovingLists(){
        return Result.ok("success",statService.listSubApprovingLists());
    }

    @GetMapping("listOrderSendingLists")
    private Object listOrderSendingLists(){
        return Result.ok("success",statService.listOrderSendingLists());
    }
}
